<!-- 导航URL -->
<div class="row wrapper border-bottom white-bg page-heading" ng-app ng-controller="switchSpecialSet072Ctrl">
	<div class="col-md-12">
		<ol class="breadcrumb">
			<li><a>功能管理</a></li>
			<li><a>功能控制总开关</a></li>
			<li class="active"><strong>{{titleName}}</strong></li>
		</ol>
	</div>
</div>
<!-- 主要内容 -->
<div class="wrapper wrapper-content animated fadeIn" ng-app ng-controller="switchSpecialSet072Ctrl">
	<form class="form-horizontal" id="form-cjtGoods-add" name="horizontal">
		<div class="form-group">
			<div class="ibox float-e-margins">
				<div class="ibox-content">
					<div class="row">
						<div class="ibox-title">
							<h5>基本说明</h5>
						</div>
						<div class="ibox-content">
							<div class="form-group ">
								<label class="col-sm-2 control-label"><i class="red_req">*</i>开关名称：</label>
								<div class="col-sm-8">
									<input type="text" class="form-control" name="functionName" ng-model="baseInfo.functionName" required maxlength="30"/>
									<div class="req_mesg" ng-show="horizontal.functionName.$dirty && horizontal.functionName.$invalid">
										<span ng-show="horizontal.functionName.$error.required">开关名称不能为空</span>
									</div>
								</div>

							</div>
							<div class="form-group ">
								<label class="col-sm-2 control-label">开关说明：</label>
								<div class="col-sm-8">
									<textarea class="form-control" rows="5" cols="10" ng-model="baseInfo.remark" name="remark" maxlength="500"></textarea>
								</div>
							</div>

						</div>
						<div class="ibox-title">
							<h5>业务配置</h5>
						</div>
						<div class="ibox-content">
							<div class="form-group">
								<label class="col-sm-2 control-label">组织管控:</label>
								<div class="col-sm-10">
									<button class="btn btn-primary5" style="float: right" ng-show="hasPermit('func.saveSettingList')" ng-click="teamAddModalShow()" >新增</button>
								</div>

							</div>
							<div class="form-group">
								<label class="col-sm-2"></label>
								<div class="col-sm-10">
									<div class="gridStyle" style="height:400px" ui-grid="teamGrid"
										 ui-grid-selection ui-grid-resize-columns ui-grid-pinning ></div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>

			<div class="col-lg-12 bgff">
				<div class="col-sm-12">
					<div class="col-sm-3"></div>
					<div class="col-sm-6">
						<button class="btn btn-new btn-mr20" type="button"
								ng-click="submit()" ng-disabled="horizontal.$invalid || submitting">提交</button>
						<button class="btn btn-primary4 btn-mr20" type="button"
								ui-sref="func.switch">返回</button>
					</div>
				</div>
			</div>
		</div>
	</form>
	<div id="teamAddModal" class="modal fade form-horizontal" tabindex="3" role="dialog">
		<form class="form-horizontal" id="form1" name="horizontalAdd">
			<div class="modal-dialog" style="height:450px;width: 700px">
				<div class="modal-content" style="height:450px;width: 700px">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal">
							&times;</button>
						<h3 class="modal-title">组织管控</h3>
					</div>
					<div class="modal-body">
						<div class="form-group">
							<label class="col-sm-3 control-label"><i class="red_req">*</i>组织选择:</label>
							<div class="col-sm-6">
								<select ng-disabled="commitType==2" class="form-control" ng-model="addInfo.teamId" name="teamId"
										required ng-change="hasSubTeam(addInfo.teamId)"
										ng-options="x.value as x.text for x in teamType">
								</select>
								<div class="req_mesg" ng-show="horizontalAdd.teamId.$dirty && horizontalAdd.teamId.$invalid">
									<span ng-show="horizontalAdd.teamId.$error.required">组织选择不能为空</span>
								</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">子组织:</label>
							<div class="col-sm-6">
								<select ng-disabled="commitType==2" class="form-control" ng-model='addInfo.teamEntryId'
										ng-options="x.value as x.text for x in subTeams">
								</select>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label"><i class="red_req">*</i>提现手续费(元):</label>
							<div class="col-sm-6">
								<input type="text" class="form-control" ng-model="addInfo.txFee"  ng-pattern="/^([0-9]\d{0,9}|0)(\.\d{1,2})?$/" required
									   name="txFee" />
								<div class="req_mesg" ng-show="horizontalAdd.txFee.$dirty && horizontalAdd.txFee.$invalid">
									<span ng-show="horizontalAdd.txFee.$error.required">金额不能为空</span>
									<span ng-show="horizontalAdd.txFee.$error.pattern">金额格式不正确</span>
								</div>
							</div>
						</div>
					</div>
					<div class="modal-footer">
						<div class="form-group control-label">
							<label class="col-sm-2 control-label"></label>
							<div class="col-sm-6">
								<button class="btn btn-primary btn-mr20" type="button" ng-click='teamAdd()'
										ng-disabled="horizontalAdd.$invalid || submittingMode">确定</button>
								<button class="btn btn-primary8" type="button" ng-click='teamAddModalHide()'
								>返回</button>
							</div>
						</div>
					</div>
				</div>
			</div>
		</form>
	</div>
</div>